<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../js/axios.js"></script>
  <script>
    // let qs = Qs
    let loginData = {
      username: 'admin1',
      password: '123321'
    }
    // axios.post('/user/login', loginData)
    // axios默认配置,放在请求之前才会生效
    axios.defaults.baseURL = 'http://47.94.46.113:7788'
    axios.defaults.headers.post['token'] = '123456'
    axios.defaults.headers.get['auth'] = 'qwer'
    axios.defaults.headers.common['name'] = 'zhangsan'
    axios.post('/user/login', loginData)
    axios.get('/user/info')
  </script>
</head>

<body>

</body>

</html>